// created Jan 28, 2009 4:06:50 PM
// by petrovic

package org.taglets.pub.tags;

import java.io.IOException;
import java.net.URISyntaxException;
import java.util.logging.Logger;

import org.taglets.exception.TagletsException;
import org.taglets.pub.ApiUrl;
import org.taglets.pub.Client;
import org.taglets.pub.Route;

public final class TagUpdateClient extends Client {
    @SuppressWarnings("unused")
    private static Logger LOG = Logger.getLogger(TagUpdateClient.class.getName());

    public TagUpdateClient() {
        apiUrl = new ApiUrl(Route.TAG_UPDATE);
    }
    
    public TagUpdateResponse updateTag(String email, String password, String tagName, String tagDescription) throws URISyntaxException, IOException, TagletsException, NoSuchMethodException {
        form.put("email", email);
        form.put("password", password);
        form.put("description", tagDescription);
        apiUrl.append("/" + tagName);
        
        TagUpdateResponse response = (TagUpdateResponse) this.post();
        return response;
    }
    
}
